Method and apparatus for hierarchical data unit-based video encoding and decoding comprising quantization parameter prediction

ABSTRACT

A method of decoding a video includes determining an initial value of a quantization parameter (QP) used to perform inverse quantization on coding units included in a slice segment, based on syntax obtained from a bitstream; determining a slice-level initial QP for predicting the QP used to perform inverse quantization on the coding units included in the slice segment, based on the initial value of the QP; and determining a predicted QP of a first quantization group of a parallel-decodable data unit included in the slice segment, based on the slice-level initial QP.

CROSS-REFERENCE TO RELATED PATENT APPLICATION

This application is a continuation application of U.S. patentapplication Ser. No. 14/446,479, filed on Jul. 30, 2014, which claimsthe benefits of a continuation application of International ApplicationNo. PCT/KR2013/000776, filed on Jan. 30, 2013, and claims the benefit ofU.S. Provisional Application No. 61/592,577, filed on Jan. 30, 2012, inthe U.S. Patent and Trademark Office, the disclosures of which areincorporated herein by reference in their entireties.

BACKGROUND

1. Field

Methods and apparatuses consistent with exemplary embodiments relate tovideo encoding and decoding.

2. Description of Related Art

In general, according to video compression standards, such as MovingPicture Expert Group (MPEG) and H.26X, a bitstream is generated bycompressing image data through prediction, transformation, quantization,and entropy encoding processes.

In the prediction process, a prediction image of image data to beencoded is generated by performing intra prediction using spatialcorrelations of images, or inter prediction using temporal correlationsof images.

In the transformation process, an error data, which is a differencebetween an original image and the prediction image generated in theprediction process, is transformed to the transformation domain by usingvarious transformation methods. Representative transformation methodsinclude discrete cosine transformation (DCT) and wavelet transformation.

In the quantization process, transformation coefficients generated inthe transformation process are appropriately loss-compressed accordingto the error value and the size of a target bitstream. Most standardimage and video codecs based on lossy compression perform quantizationand inverse quantization processes according to a quantization step. Inthe quantization process, a quantized value is obtained by dividing aninput value by the quantization step and then rounding off the dividedvalue to an integer. Due to the quantization process, information isloss-compressed. Because all lossy compression technologies include aquantization process, original data may not be perfectly restored but acompression rate may be increased.

SUMMARY

Exemplary embodiments of the present application provide a solution forimproving a process of predicting a quantization parameter (QP) used toperform quantization or inverse quantization in order to process videodata in parallel.

According to aspects of the exemplary embodiments, a predictedquantization parameter (QP) of a first quantization group of aparallel-processible data unit is obtained by using a slice-levelinitial QP.

According to an aspect of an exemplary embodiment, there is provided amethod of decoding a video, the method including determining an initialvalue of a quantization parameter (QP) used to perform inversequantization on coding units included in a slice segment, based onsyntax obtained from a bitstream; determining a slice-level initial QPfor predicting the QP used to perform inverse quantization on the codingunits included in the slice segment, based on the initial value of theQP; determining a predicted QP of a first quantization group of aparallel-decodable data unit included in the slice segment, based on theslice-level initial QP; determining a QP to be applied to the firstquantization group based on the predicted QP; and performing inversequantization on a coding unit included in the first quantization group,based on the determined QP.

According to another aspect of an exemplary embodiment, there isprovided an apparatus for decoding a video, the apparatus including anentropy decoder configured to determine an initial value of aquantization parameter (QP) used to perform inverse quantization oncoding units included in a slice segment, based on syntax obtained froma bitstream; and an inverse quantizer configured to determine aslice-level initial QP for predicting the QP used to perform inversequantization on the coding units included in the slice segment, based onthe initial value of the QP, determine a predicted QP of a firstquantization group of a parallel-decodable data unit included in theslice segment, based on the slice-level initial QP, determine a QP to beapplied to the first quantization group based on the obtained predictedQP, and perform inverse quantization on a coding unit included in thefirst quantization group, based on the determined QP.

According to another aspect of an exemplary embodiment, there isprovided a method of encoding a video, the method including obtaining aquantization parameter (QP) used to perform quantization on coding unitsincluded in a slice segment; determining a slice-level initial QP forpredicting a QP of a first quantization group of a parallel-decodabledata unit included in the slice segment; determining a predicted QP ofthe first quantization group based on the determined slice-level initialQP; and generating a bitstream including syntax information indicatingthe determined slice-level initial QP.

According to another aspect of an exemplary embodiment, there isprovided an apparatus for encoding a video, the apparatus including aquantizer configured to perform quantization on coding units included ina slice segment, determine a slice-level initial quantization parameter(QP) for predicting a QP of a first quantization group of aparallel-decodable data unit included in the slice segment, obtain apredicted QP of the first quantization group based on the determinedslice-level initial QP, and output a difference between a QP used toperform quantization on a coding unit included in the first quantizationgroup and the predicted QP, and the determined slice-level initial QP;and an entropy encoder configured to generate a bitstream comprisingsyntax information indicating the determined slice-level initial QP.

According to aspects of the exemplary embodiments, a predictedquantization parameter (QP) of an initially quantized or inverselyquantized data unit may be obtained based on encoding information of anupper data unit regardless of a processing order of coding units, andthus a bottleneck problem in which processing of a data unit is delayeduntil another data unit is completely processed according to aprocessing order of data units may be solved in a quantization orinverse quantization process.

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other aspects will become more apparent by describing indetail exemplary embodiments thereof with reference to the attacheddrawings in which:

FIG. 1 is a block diagram of an apparatus for encoding a video,according to an exemplary embodiment;

FIG. 2 is a block diagram of an apparatus for decoding a video,according to an exemplary embodiment;

FIG. 3 is a diagram for describing a concept of coding units accordingto an exemplary embodiment;

FIG. 4 is a block diagram of an image encoder based on coding units,according to an exemplary embodiment;

FIG. 5 is a block diagram of an image decoder based on coding units,according to an exemplary embodiment;

FIG. 6 is a diagram illustrating deeper coding units according todepths, and partitions, according to an exemplary embodiment;

FIG. 7 is a diagram for describing a relationship between a coding unitand transformation units (TUs), according to an exemplary embodiment;

FIG. 8 is a diagram for describing encoding information of coding unitscorresponding to a coded depth, according to an exemplary embodiment;

FIG. 9 is a diagram of deeper coding units according to depths,according to an exemplary embodiment;

FIGS. 10 through 12 are diagrams for describing a relationship betweencoding units, prediction units, and TUs, according to an exemplaryembodiment;

FIG. 13 is a diagram for describing a relationship between a codingunit, a prediction unit, and a TU, according to encoding modeinformation;

FIG. 14 is a detailed block diagram of a quantizer illustrated in FIG.4, according to an exemplary embodiment;

FIG. 15 is a detailed block diagram of an entropy encoder illustrated inFIG. 4, according to an exemplary embodiment;

FIG. 16 shows slice segments, slices, and largest coding units (LCUs)that are data units used to partition a picture, according to anexemplary embodiment;

FIG. 17 shows tiles and slice segments that are data units used topartition a picture, according to an exemplary embodiment;

FIGS. 18A and 18B show correlations among tiles, slice segments, slices,and LCUs, according to an exemplary embodiment;

FIG. 19 is a reference diagram for describing wavefront parallelprocessing (WPP), according to an exemplary embodiment;

FIG. 20 is a diagram for describing a process of obtaining a predictedquantization parameter (QP) of an LCU included in a slice segment,according to an exemplary embodiment;

FIG. 21 is a diagram for describing a process of obtaining a predictedQP of a coding unit included in an LCU, according to an exemplaryembodiment;

FIG. 22 is a table showing QP-related syntax provided to a pictureparameter set (PPS), according to an exemplary embodiment;

FIG. 23 is a table showing QP-related syntax provided to a slice segmentheader, according to an exemplary embodiment;

FIG. 24 is a table showing QP-related syntax added into transformationunit information, according to an exemplary embodiment;

FIG. 25 is a flowchart of a video encoding method according to anexemplary embodiment;

FIG. 26 is a detailed block diagram of an entropy decoder illustrated inFIG. 5, according to an exemplary embodiment;

FIG. 27 is a detailed block diagram of an inverse quantizer illustratedin FIG. 5, according to an exemplary embodiment; and

FIG. 28 is a flowchart of a video decoding method according to anexemplary embodiment.

DETAILED DESCRIPTION OF EXEMPLARY EMBODIMENTS

Hereinafter, the exemplary embodiments will be described in detail withreference to the attached drawings.

FIG. 1 is a block diagram of a video encoding apparatus 100 according toan exemplary embodiment.

The video encoding apparatus 100 includes a largest coding unit (LCU)splitter 110, a coding unit determiner 120, and an outputter 130.

The LCU splitter 110 may split a current picture of an image based on anLCU, which is a coding unit of a maximum size. If the current picture islarger than the LCU, image data of the current picture may be split intoat least one LCU. The LCU may be a data unit having a size of 32×32,64×64, 128×128, 256×256, etc., wherein a shape of the data unit is asquare which has a width and length of 2^(n) and is greater than 8. Theimage data may be output to the coding unit determiner 120 according toeach LCU.

A coding unit may be characterized by a maximum size and a depth. Thedepth denotes the number of times the coding unit is spatially splitfrom the LCU, and as the depth deepens, deeper coding units according todepths may be split from the LCU to a smallest coding unit. A depth ofthe LCU is an uppermost depth and a depth of the smallest coding unit isa lowermost depth. Because a size of a coding unit corresponding to eachdepth decreases as the depth of the LCU deepens, a coding unitcorresponding to an upper depth may include a plurality of coding unitscorresponding to lower depths.

As described above, image data of the current picture is split into theLCUs according to a maximum size of the coding unit, and each of theLCUs may include deeper coding units that are split according to depths.Because the LCU is split according to depths, the image data of aspatial domain included in the LCU may be hierarchically classifiedaccording to depths.

A maximum depth and a maximum size of a coding unit, which limit thetotal number of times a height and a width of the LCU are hierarchicallysplit, may be predetermined.

The coding unit determiner 120 encodes at least one split regionobtained by splitting a region of the LCU according to depths, anddetermines a depth to output finally encoded image data according to theat least one split region. In other words, the coding unit determiner120 determines a coded depth by encoding the image data in the deepercoding units according to depths, according to the LCU of the currentpicture, and selecting a depth having the smallest encoding error. Thedetermined coded depth and the encoded image data according to LCUs areoutput to the outputter 130.

The image data in the LCU is encoded based on the deeper coding unitscorresponding to at least one depth equal to or smaller than the maximumdepth, and results of encoding the image data are compared based on eachof the deeper coding units. A depth having the smallest encoding errormay be selected after comparing encoding errors of the deeper codingunits. At least one coded depth may be selected for each LCU.

The size of the LCU is split as a coding unit is hierarchically splitaccording to depths and as the number of coding units increases. Also,even if coding units correspond to a same depth in one LCU, it isdetermined whether to split each of the coding units corresponding tothe same depth to a lower depth by measuring an encoding error of theimage data of each coding unit, separately. Accordingly, even when imagedata is included in one LCU, the image data is split into regionsaccording to the depths, and the encoding errors may differ according toregions in the one LCU, and thus the coded depths may differ accordingto regions in the image data. Thus, one or more coded depths may bedetermined in one LCU, and the image data of the LCU may be dividedaccording to coding units of at least one coded depth.

Accordingly, the coding unit determiner 120 may determine coding unitshaving a tree structure included in the LCU. The ‘coding units having atree structure’ include coding units corresponding to a depth determinedto be the coded depth, from among all deeper coding units included inthe LCU. A coding unit having a coded depth may be hierarchicallydetermined according to depths in the same region of the LCU, and may beindependently determined in different regions. Similarly, a coded depthin a current region may be independently determined from a coded depthin another region.

A maximum depth is an index related to the number of times splitting isperformed from an LCU to a smallest coding unit. A first maximum depthmay denote the total number of times splitting is performed from the LCUto the smallest coding unit. A second maximum depth may denote the totalnumber of depth levels from the LCU to the smallest coding unit. Forexample, when a depth of the LCU is 0, a depth of a coding unit, inwhich the LCU is split once, may be set to 1, and a depth of a codingunit, in which the LCU is split twice, may be set to 2. Here, if thesmallest coding unit is a coding unit in which the LCU is split fourtimes, five depth levels of depths 0, 1, 2, 3, and 4 exist, and thus thefirst maximum depth may be set to 4, and the second maximum depth may beset to 5.

Prediction encoding and transformation may be performed according to theLCU. The prediction encoding and the transformation are also performedbased on the deeper coding units according to a depth equal to or depthsless than the maximum depth, according to the LCU.

Because the number of deeper coding units increases whenever the LCU issplit according to depths, encoding including the prediction encodingand the transformation is performed on all of the deeper coding unitsgenerated as the depth deepens. For convenience of description, theprediction encoding and the transformation will now be described basedon a coding unit of a current depth, in an LCU.

The video encoding apparatus 100 may variously select a size or shape ofa data unit for encoding the image data. In order to encode the imagedata, operations, such as prediction encoding, transformation, andentropy encoding, are performed, and at this time, the same data unitmay be used for all operations or different data units may be used foreach operation.

For example, the video encoding apparatus 100 may select not only acoding unit for encoding the image data, but also a data unit differentfrom the coding unit so as to perform the prediction encoding on theimage data in the coding unit.

In order to perform prediction encoding in the LCU, the predictionencoding may be performed based on a coding unit corresponding to acoded depth, i.e., based on a coding unit that is no longer split intocoding units corresponding to a lower depth. Hereinafter, the codingunit that is no longer split and becomes a basis unit for predictionencoding will now be referred to as a ‘prediction unit’. A partitionobtained by splitting the prediction unit may include a prediction unitor a data unit obtained by splitting at least one of a height and awidth of the prediction unit.

For example, when a coding unit of 2N×2N (where N is a positive integer)is no longer split and becomes a prediction unit of 2N×2N, a size of apartition may be 2N×2N, 2N×N, N×2N, or N×N. Examples of a partition typeinclude symmetrical partitions that are obtained by symmetricallysplitting a height or width of the prediction unit, partitions obtainedby asymmetrically splitting the height or width of the prediction unit,such as 1:n or n:1, partitions that are obtained by geometricallysplitting the prediction unit, and partitions having arbitrary shapes.

A prediction mode of the prediction unit may be at least one of an intramode, an inter mode, and a skip mode. For example, the intra mode or theinter mode may be performed on the partition of 2N×2N, 2N×N, N×2N, orN×N. Also, the skip mode may be performed only on the partition of2N×2N. The encoding is independently performed on one prediction unit ina coding unit, thereby selecting a prediction mode having the smallestencoding error.

The video encoding apparatus 100 may also perform the transformation onthe image data in a coding unit based on, not only the coding unit forencoding the image data, but also based on a data unit that is differentfrom the coding unit.

In order to perform the transformation in the coding unit, thetransformation may be performed based on a data unit having a sizesmaller than or equal to the coding unit. For example, the data unit forthe transformation may include a data unit for an intra mode and a dataunit for an inter mode.

A data unit used as a base of the transformation will now be referred toas a ‘transformation unit (TU)’. Similar to the coding unit, the TU inthe coding unit may be recursively split into smaller sized regions, sothat the TU may be independently determined in units of regions. Thus,residual data in the coding unit may be divided according to the TUhaving the tree structure according to transformation depths.

A transformation depth indicating the number of times splitting isperformed to reach the TU by splitting the height and width of thecoding unit may also be set in the TU. For example, in a current codingunit of 2N×2N, a transformation depth may be 0 when the size of a TU is2N×2N, may be 1 when the size of a TU is N×N, and may be 2 when the sizeof a TU is N/2×N/2. That is, the TU having the tree structure may alsobe set according to transformation depths.

Encoding information according to coding units corresponding to a codeddepth requires, not only information about the coded depth, but alsoinformation related to prediction encoding and transformation.Accordingly, the coding unit determiner 120 determines, not only a codeddepth having the smallest encoding error, but also determines apartition type in a prediction unit, a prediction mode according toprediction units, and a size of a TU for transformation.

Coding units according to a tree structure in an LCU and a method ofdetermining a partition, according to exemplary embodiments, will bedescribed in detail below with reference to FIGS. 3 through 12.

The coding unit determiner 120 may measure an encoding error of deepercoding units according to depths by using Rate-Distortion Optimizationbased on Lagrangian multipliers.

The outputter 130 outputs the image data of the LCU, which is encodedbased on the at least one coded depth determined by the coding unitdeterminer 120, and information about the encoding mode according to thecoded depth, in bit streams.

The encoded image data may be a coding result of residual data of animage.

The information about the encoding mode according to the coded depth mayinclude information about the coded depth, information about thepartition type in the prediction unit, prediction mode information, andsize information of the TU.

The information about the coded depth may be defined by using splitinformation according to depths, which indicates whether encoding isperformed on coding units of a lower depth instead of a current depth.If the current depth of the current coding unit is the coded depth,image data in the current coding unit is encoded and output, and thusthe split information may be defined not to split the current codingunit to a lower depth. Alternatively, if the current depth of thecurrent coding unit is not the coded depth, the encoding is performed onthe coding unit of the lower depth, and thus the split information maybe defined to split the current coding unit to obtain the coding unitsof the lower depth.

If the current depth is not the coded depth, encoding is performed onthe coding unit that is split into the coding unit of the lower depth.Because at least one coding unit of the lower depth exists in one codingunit of the current depth, the encoding is repeatedly performed on eachcoding unit of the lower depth, and thus the encoding may be recursivelyperformed for the coding units having the same depth.

Because the coding units having a tree structure are determined for oneLCU, and information about at least one encoding mode is determined fora coding unit of a coded depth, information about at least one encodingmode may be determined for one LCU. Also, a coded depth of the imagedata of the LCU may be different according to locations because theimage data is hierarchically split according to depths, and thusinformation about the coded depth and the encoding mode may be set forthe image data.

Accordingly, the outputter 130 may assign encoding information about acorresponding coded depth and an encoding mode to at least one of thecoding unit, the prediction unit, and a minimum unit included in theLCU.

The minimum unit is a square-shaped data unit obtained by splitting thesmallest coding unit constituting the lowermost depth by 4.Alternatively, the minimum unit may be a maximum square-shaped data unitthat may be included in all of the coding units, prediction units,partition units, and TUs included in the LCU.

For example, the encoding information output through the outputter 130may be classified into encoding information according to coding unitsand encoding information according to prediction units. The encodinginformation according to the coding units may include the informationabout the prediction mode and about the size of the partitions. Theencoding information according to the prediction units may includeinformation about an estimated direction of an inter mode, about areference image index of the inter mode, about a motion vector, about achroma component of an intra mode, and about an interpolation method ofthe intra mode. Also, information about a maximum size of the codingunit defined according to pictures, slices, or GOPs, and informationabout a maximum depth may be inserted into a header of a bit stream.

In the video encoding apparatus 100, the deeper coding unit may be acoding unit obtained by dividing a height or width of a coding unit ofan upper depth, which is one layer above, by two. In other words, whenthe size of the coding unit of the current depth is 2N×2N, the size ofthe coding unit of the lower depth is N×N. Also, the coding unit of thecurrent depth having the size of 2N×2N may include a maximum number offour coding units of the lower depth.

Accordingly, the video encoding apparatus 100 may form the coding unitshaving the tree structure by determining coding units having an optimumshape and an optimum size for each LCU, based on the size of the LCU andthe maximum depth determined considering characteristics of the currentpicture. Also, because encoding may be performed on each LCU by usingany one of various prediction modes and transformations, an optimumencoding mode may be determined considering characteristics of thecoding unit of various image sizes.

Thus, if an image having a high resolution or a large data amount isencoded in a conventional macroblock, a number of macroblocks perpicture excessively increases. Accordingly, a number of pieces ofcompressed information generated for each macroblock increases, and thusit is difficult to transmit the compressed information and datacompression efficiency decreases. However, by using the video encodingapparatus 100, image compression efficiency may be increased because acoding unit is adjusted while considering characteristics of an imagewhile increasing a maximum size of a coding unit while considering asize of the image.

FIG. 2 is a block diagram of a video decoding apparatus 200 according toan exemplary embodiment.

The video decoding apparatus 200 includes a receiver 210, an image dataand encoding information extractor 220, and an image data decoder 230.Definitions of various terms, such as a coding unit, a depth, aprediction unit, a transformation unit (TU), and information aboutvarious encoding modes, for various operations of the video decodingapparatus 200 are identical to those described with reference to FIG. 1and the video encoding apparatus 100.

The receiver 210 receives and parses a bitstream of an encoded video.The image data and encoding information extractor 220 extracts encodedimage data for each coding unit from the parsed bitstream, wherein thecoding units have a tree structure according to each LCU, and outputsthe extracted image data to the image data decoder 230. The image dataand encoding information extractor 220 may extract information about anLCU of a current picture, from a header of the current picture.

Also, the image data and encoding information extractor 220 extractsinformation about a coded depth and an encoding mode for the codingunits having a tree structure according to each LCU, from the parsedbitstream. The extracted information about the coded depth and theencoding mode is output to the image data decoder 230. In more detail,the image data in a bit stream may be split into the LCU so that theimage data decoder 230 may decode the image data for each LCU.

The information about the coded depth and the encoding mode according tothe LCU may be set for information about at least one coding unitcorresponding to the coded depth, and information about an encoding modemay include information about a partition type of a corresponding codingunit corresponding to the coded depth, about a prediction mode, and asize of a TU. Also, splitting information according to depths may beextracted as the information about the coded depth.

The information about the coded depth and the encoding mode according toeach LCU extracted by the image data and encoding information extractor220 is information about a coded depth and an encoding mode determinedto generate a minimum encoding error when an encoder, such as the videoencoding apparatus 100, repeatedly performs encoding for each deepercoding unit according to depths according to each LCU. Accordingly, thevideo decoding apparatus 200 may restore an image by decoding the imagedata according to a coded depth and an encoding mode that generates theminimum encoding error.

Because encoding information about the coded depth and the encoding modemay be assigned to a predetermined data unit from among a correspondingcoding unit, a prediction unit, and a minimum unit, the image data andencoding information extractor 220 may extract the information about thecoded depth and the encoding mode according to the predetermined dataunits. The predetermined data units to which the same information aboutthe coded depth and the encoding mode is assigned may be inferred to bethe data units included in the same LCU.

The image data decoder 230 restores the current picture by decoding theimage data in each LCU based on the information about the coded depthand the encoding mode according to the LCUs. In other words, the imagedata decoder 230 may decode the encoded image data based on theextracted information about the partition type, the prediction mode, andthe TU for each coding unit from among the coding units having the treestructure included in each LCU. A decoding process may includeprediction, including intra prediction, and motion compensation, andinverse transformation.

The image data decoder 230 may perform intra prediction or motioncompensation according to a partition and a prediction mode of eachcoding unit, based on the information about the partition type and theprediction mode of the prediction unit of the coding unit according tocoded depths.

Also, the image data decoder 230 may perform inverse transformationaccording to each TU in the coding unit, based on the information aboutthe size of the TU of the coding unit according to coded depths, toperform the inverse transformation according to LCUs.

The image data decoder 230 may determine at least one coded depth of acurrent LCU by using split information according to depths. If the splitinformation indicates that image data is no longer split in the currentdepth, the current depth is a coded depth. Accordingly, the image datadecoder 230 may decode the coding unit of the current depth with respectto the image data of the current LCU by using the information about thepartition type of the prediction unit, the prediction mode, and the sizeof the TU.

In other words, data units containing the encoding information includingthe same split information may be gathered by observing the encodinginformation set assigned for the predetermined data unit from among thecoding unit, the prediction unit, and the minimum unit, and the gathereddata units may be considered to be one data unit to be decoded by theimage data decoder 230 in the same encoding mode.

The video decoding apparatus 200 may obtain information about at leastone coding unit that generates the minimum encoding error when encodingis recursively performed for each LCU, and may use the information todecode the current picture. In other words, encoded image data of thecoding units having the tree structure determined to be the optimumcoding units in each LCU may be decoded.

Accordingly, even if image data has a high resolution and a large amountof data, the image data may be efficiently decoded and restored by usinga size of a coding unit and an encoding mode, which are adaptivelydetermined according to characteristics of the image data, by usinginformation about an optimum encoding mode received from an encoder.

A method of determining coding units having a tree structure, aprediction unit, and a TU, according to an exemplary embodiment, willnow be described with reference to FIGS. 3 through 13.

FIG. 3 is a diagram for describing a concept of coding units accordingto an exemplary embodiment.

A size of a coding unit may be expressed in width×height, and may be64×64, 32×32, 16×16, and 8×8. A coding unit of 64×64 may be split intopartitions of 64×64, 64×32, 32×64, or 32×32; and a coding unit of 32×32may be split into partitions of 32×32, 32×16, 16×32, or 16×16; a codingunit of 16×16 may be split into partitions of 16×16, 16×8, 8×16, or 8×8;and a coding unit of 8×8 may be split into partitions of 8×8, 8×4, 4×8,or 4×4.

In video data 310, a resolution is 1920×1080, a maximum size of a codingunit is 64, and a maximum depth is 2. In video data 320, a resolution is1920×1080, a maximum size of a coding unit is 64, and a maximum depth is3. In video data 330, a resolution is 352×288, a maximum size of acoding unit is 16, and a maximum depth is 1. The maximum depth shown inFIG. 3 denotes a total number of splits from an LCU to a smallest codingunit.

If a resolution is high or a data amount is large, a maximum size of acoding unit may be large, so as to not only increase encoding efficiencybut also to accurately reflect characteristics of an image. Accordingly,the maximum size of the coding unit of the video data 310 and 320 havingthe higher resolution than the video data 330 may be 64.

Because the maximum depth of the video data 310 is 2, coding units 315of the vide data 310 may include an LCU having a long axis size of 64,and coding units having long axis sizes of 32 and 16 because depths aredeepened to two layers by splitting the LCU twice. Meanwhile, becausethe maximum depth of the video data 330 is 1, coding units 335 of thevideo data 330 may include an LCU having a long axis size of 16, andcoding units having a long axis size of 8 because depths are deepened toone layer by splitting the LCU once.

Because the maximum depth of the video data 320 is 3, coding units 325of the video data 320 may include an LCU having a long axis size of 64,and coding units having long axis sizes of 32, 16, and 8 because thedepths are deepened to 3 layers by splitting the LCU three times. As adepth deepens, detailed information may be precisely expressed.

FIG. 4 is a block diagram of an image encoder 400 based on coding units,according to an exemplary embodiment.

The image encoder 400 performs operations performed when the coding unitdeterminer 120 of the video encoding apparatus 100 encodes image data.In more detail, an intra predictor 410 performs intra prediction oncoding units in an intra mode, with respect to a current frame 405, anda motion estimator 420 and a motion compensator 425 respectively performinter estimation and motion compensation on coding units in an intermode by using the current frame 405 and a reference frame 495.

Data output from the intra predictor 410, the motion estimator 420, andthe motion compensator 425 is output as a quantized transformationcoefficient through a transformer 430 and a quantizer 440. The quantizedtransformation coefficient is restored as data in a spatial domainthrough an inverse quantizer 460 and an inverse transformer 470, and therestored data in the spatial domain is output as the reference frame 495after being post-processed through a deblocking unit 480 and a loopfiltering unit 490. The quantized transformation coefficient may beoutput as a bitstream 455 through an entropy encoder 450.

In order for the image encoder 400 to be applied in the video encodingapparatus 100, all elements of the image encoder 400, i.e., the intrapredictor 410, the motion estimator 420, the motion compensator 425, thetransformer 430, the quantizer 440, the entropy encoder 450, the inversequantizer 460, the inverse transformer 470, the deblocking unit 480, andthe loop filtering unit 490, perform operations based on each codingunit from among coding units having a tree structure while consideringthe maximum depth of each LCU.

Specifically, the intra predictor 410, the motion estimator 420, and themotion compensator 425 should determine partitions and a prediction modeof each coding unit from among the coding units having a tree structurewhile considering the maximum size and the maximum depth of a currentLCU, and the transformer 430 determines the size of the TU in eachcoding unit from among the coding units having a tree structure.

FIG. 5 is a block diagram of an image decoder 500 based on coding units,according to an exemplary embodiment.

A parser 510 parses encoded image data to be decoded and informationabout encoding required for decoding, from a bitstream 505. The encodedimage data is output as inverse quantized data through an entropydecoder 520 and an inverse quantizer 530, and the inverse quantized datais restored to image data in a spatial domain through an inversetransformer 540.

An intra predictor 550 performs intra prediction on coding units in anintra mode with respect to the image data in the spatial domain, and amotion compensator 560 performs motion compensation on coding units inan inter mode by using a reference frame 585.

The image data in the spatial domain, which passed through the intrapredictor 550 and the motion compensator 560, may be output as arestored frame after being post-processed through a deblocking unit 570and a loop filtering unit 580. Also, the image data, which ispost-processed through the deblocking unit 570 and the loop filteringunit 580, may be output as the reference frame 595.

In order for the image data decoder 230 of the video decoding apparatus200 to decode image data, operations after the parser 510 of the imagedecoder 500 may be performed.

In order for the image decoder 500 to be applied in the video decodingapparatus 200, all elements of the image decoder 500, i.e., the parser510, the entropy decoder 520, the inverse quantizer 530, the inversetransformer 540, the intra predictor 550, the motion compensator 560,the deblocking unit 570, and the loop filtering unit 580, performoperations based on coding units having a tree structure for each LCU.

Specifically, the intra predictor 550 and the motion compensator 560determine a partition and a prediction mode for each coding unit havinga tree structure, and the inverse transformer 540 has to determine asize of a TU for each coding unit.

FIG. 6 is a diagram illustrating deeper coding units according todepths, and partitions, according to an exemplary embodiment.

The video encoding apparatus 100 and the video decoding apparatus 200use hierarchical coding units to consider characteristics of an image. Amaximum height, a maximum width, and a maximum depth of coding units maybe adaptively determined according to the characteristics of the image,or may be differently set by a user. Sizes of deeper coding unitsaccording to depths may be determined according to the predeterminedmaximum size of the coding unit.

In a hierarchical structure 600 of coding units, the maximum height andthe maximum width of the coding units are each 64, and the maximum depthis 4. Because a depth deepens along a vertical axis of the hierarchicalstructure 600, a height and a width of the deeper coding unit are eachsplit. Also, a prediction unit and partitions, which are bases forprediction encoding of each deeper coding unit, are shown along ahorizontal axis of the hierarchical structure 600.

In other words, a coding unit 610 is an LCU in the hierarchicalstructure 600, wherein a depth is 0 and a size, i.e., a height by width,is 64×64. The depth deepens along the vertical axis, and a coding unit620 having a size of 32×32 and a depth of 1, a coding unit 630 having asize of 16×16 and a depth of 2, a coding unit 640 having a size of 8×8and a depth of 3, and a coding unit 650 having a size of 4×4 and a depthof 4 exist. The coding unit 650 having the size of 4×4 and the depth of4 is a smallest coding unit.

The prediction unit and the partitions of a coding unit are arrangedalong the horizontal axis according to each depth. In other words, ifthe coding unit 610 having the size of 64×64 and the depth of 0 is aprediction unit, the prediction unit may be split into partitionsincluded in the coding unit 610, i.e. a partition 610 having a size of64×64, partitions 612 having the size of 64×32, partitions 614 havingthe size of 32×64, or partitions 616 having the size of 32×32.

Similarly, a prediction unit of the coding unit 620 having the size of32×32 and the depth of 1 may be split into partitions included in thecoding unit 620, i.e. a partition 620 having a size of 32×32, partitions622 having a size of 32×16, partitions 624 having a size of 16×32, andpartitions 626 having a size of 16×16.

Similarly, a prediction unit of the coding unit 630 having the size of16×16 and the depth of 2 may be split into partitions included in thecoding unit 630, i.e. a partition having a size of 16×16 included in thecoding unit 630, partitions 632 having a size of 16×8, partitions 634having a size of 8×16, and partitions 636 having a size of 8×8.

Similarly, a prediction unit of the coding unit 640 having the size of8×8 and the depth of 3 may be split into partitions included in thecoding unit 640, i.e. a partition having a size of 8×8 included in thecoding unit 640, partitions 642 having a size of 8×4, partitions 644having a size of 4×8, and partitions 646 having a size of 4×4.

The coding unit 650 having the size of 4×4 and the depth of 4 is thesmallest coding unit and a coding unit of the lowermost depth. Aprediction unit of the coding unit 650 is only assigned to a partitionhaving a size of 4×4.

In order to determine the at least one coded depth of the coding unitsconstituting the LCU 610, the coding unit determiner 120 of the videoencoding apparatus 100 performs encoding for coding units correspondingto each depth included in the LCU 610.

The number of deeper coding units according to depths including data inthe same range and the same size increases as the depth deepens. Forexample, four coding units corresponding to a depth of 2 are required tocover data that is included in one coding unit corresponding to a depthof 1. Accordingly, in order to compare encoding results of the same dataaccording to depths, the coding unit corresponding to the depth of 1 andfour coding units corresponding to the depth of 2 are each encoded.

In order to perform encoding for a current depth from among the depths,a smallest encoding error may be selected for the current depth byperforming encoding for each prediction unit in the coding unitscorresponding to the current depth, along the horizontal axis of thehierarchical structure 600. Alternatively, the minimum encoding errormay be searched for by comparing the least encoding errors according todepths and performing encoding for each depth as the depth deepens alongthe vertical axis of the hierarchical structure 600. A depth and apartition having the minimum encoding error in the coding unit 610 maybe selected as the coded depth and a partition type of the coding unit610.

FIG. 7 is a diagram for describing a relationship between a coding unit710 and transformation units (TUs) 720, according to an exemplaryembodiment.

The video encoding apparatus 100 or the video decoding apparatus 200encodes or decodes an image according to coding units having sizessmaller than or equal to an LCU for each LCU. Sizes of TUs fortransformation during encoding may be selected based on data units thatare not larger than a corresponding coding unit.

For example, in the video encoding apparatus 100 or the video decodingapparatus 200, if a size of the coding unit 710 is 64×64, transformationmay be performed by using the TUs 720 having a size of 32×32.

Also, data of the coding unit 710 having the size of 64×64 may beencoded by performing the transformation on each of the TUs having thesize of 32×32, 16×16, 8×8, and 4×4, which are smaller than 64×64, andthen a TU having the least coding error may be selected.

FIG. 8 is a diagram for describing encoding information of coding unitscorresponding to a coded depth, according to an exemplary embodiment.

An output unit 130 of the video encoding apparatus 100 may encode andtransmit information 800 about a partition type, information 810 about aprediction mode, and information 820 about a size of a TU for eachcoding unit corresponding to a coded depth, as information about anencoding mode.

The information 800 indicates information about a shape of a partitionobtained by splitting a prediction unit of a current coding unit,wherein the partition is a data unit for prediction encoding the currentcoding unit. For example, a current coding unit CU_0 having a size of2N×2N may be split into any one of a partition 802 having a size of2N×2N, a partition 804 having a size of 2N×N, a partition 806 having asize of N×2N, and a partition 808 having a size of N×N. Here, theinformation 800 about a partition type is set to indicate one of thepartition 804 having a size of 2N×N, the partition 806 having a size ofN×2N, and the partition 808 having a size of N×N

The information 810 indicates a prediction mode of each partition. Forexample, the information 810 may indicate a mode of prediction encodingperformed on a partition indicated by the information 800, i.e., anintra mode 812, an inter mode 814, or a skip mode 816.

The information 820 indicates a size of a TU to be based on whentransformation is performed on a current coding unit. For example, theTU may be a first intra TU 822, a second intra TU 824, a first inter TU826, or a second inter TU 828.

The image data and encoding information extractor 220 of the videodecoding apparatus 200 may extract and use the information 800, 810, and820 for decoding, according to each deeper coding unit.

FIG. 9 is a diagram of deeper coding units according to depths,according to an exemplary embodiment.

Split information may be used to indicate a change of a depth. The spiltinformation indicates whether a coding unit of a current depth is splitinto coding units of a lower depth.

A prediction unit 910 for prediction encoding of a coding unit 900having a depth of 0 and a size of 2N_0×2N_0 may include partitions of apartition type 912 having a size of 2N_0×2N_0, a partition type 914having a size of 2N_0×N_0, a partition type 916 having a size ofN_0×2N_0, and a partition type 918 having a size of N_0×N_0. FIG. 9 onlyillustrates the partition types 912 through 918 which are obtained bysymmetrically splitting the prediction unit 910, but a partition type isnot limited thereto, and the partitions of the prediction unit 910 mayinclude asymmetrical partitions, partitions having a predeterminedshape, and partitions having a geometrical shape.

Prediction encoding is repeatedly performed on one partition having asize of 2N_0×2N_0, two partitions having a size of 2N_0×N_0, twopartitions having a size of N_0×2N_0, and four partitions having a sizeof N_0×N_, according to each partition type. The prediction encoding inan intra mode and an inter mode may be performed on the partitionshaving the sizes of 2N_(—) 0×2N_(—) 0, N_(—) 0×2N_(—) 0, 2N_(—) 0×N_0,and N_0×N_0. The prediction encoding in a skip mode is performed only onthe partition having the size of 2N_0×2N_0.

If an encoding error is the smallest in one of the partition types 912through 916 having the sizes of 2N_0×2N_0, 2N_0×N_0, and N_0×2N_0, theprediction unit 910 may not be split into a lower depth.

If the encoding error is the smallest in the partition type 918 havingthe size of N_0×N_0, a depth is changed from 0 to 1 to split thepartition type 918 in operation 920, and encoding is repeatedlyperformed on partition type coding units having a depth of 2 and a sizeof N_0×N_0 to search for a minimum encoding error.

A prediction unit 940 for prediction encoding of the (partition type)coding unit 930 having a depth of 1 and a size of 2N_1×2N_1 (=N_0×N_0)may include partitions of a partition type 942 having a size of2N_1×2N_1, a partition type 944 having a size of 2N_1×N_1, a partitiontype 946 having a size of N_1×2N_1, and a partition type 948 having asize of N_1×N_1.

If an encoding error is the smallest in the partition type 948 havingthe size of N_1×N_1, a depth is changed from 1 to 2 to split thepartition type 948 in operation 950, and encoding is repeatedlyperformed on coding units 960, which have a depth of 2 and a size ofN_2×N_2 to search for a minimum encoding error.

When a maximum depth is d, a split operation according to each depth maybe performed up to when a depth becomes d−1, and split information maybe encoded as up to when a depth is one of 0 to d−2. In other words,when encoding is performed up to when the depth is d−1 after a codingunit corresponding to a depth of d−2 is split in operation 970, aprediction unit 990 for prediction encoding a coding unit 980 having adepth of d−1 and a size of 2N_(d−1)×2N_(d−1) may include partitions of apartition type 992 having a size of 2N_(d−1)×2N_(d−1), a partition type994 having a size of 2N_(d−1)×N_(d−1), a partition type 996 having asize of N_(d−1)×2N_(d−1), and a partition type 998 having a size ofN_(d−1)×N_(d−1).

Prediction encoding may be repeatedly performed on one partition havinga size of 2N_(d−1)×2N_(d−1), two partitions having a size of2N_(d−1)×N_(d−1), two partitions having a size of N_(d−1)×2N_(d−1), fourpartitions having a size of N_(d−1)×N_(d−1) from among the partitiontypes 992 through 998 to search for a partition type having a minimumencoding error.

Even when the partition type 998 having the size of N_(d−1)×N_(d−1) hasthe minimum encoding error, because a maximum depth is d, a coding unitCU_(d−1) having a depth of d−1 is no longer split to a lower depth, anda coded depth for the coding units constituting the current LCU 900 isdetermined to be d−1 and a partition type of the current LCU 900 may bedetermined to be N_(d−1)×N_(d−1). Also, because the maximum depth is d,split information for the smallest coding unit 980 is not set.

A data unit 999 may be a ‘minimum unit’ for the current LCU. A minimumunit may be a rectangular data unit obtained by splitting the smallestcoding unit 980 by 4. By performing the encoding repeatedly, the videoencoding apparatus 100 may select a depth having the smallest encodingerror by comparing encoding errors according to depths of the codingunit 900 to determine a coded depth, and set a corresponding partitiontype and a prediction mode as an encoding mode of the coded depth.

As such, the minimum encoding errors according to depths are compared inall of the depths of 0 through d, and a depth having the smallestencoding error may be determined as a coded depth. The coded depth, thepartition type of the prediction unit, and the prediction mode may beencoded and transmitted as information about an encoding mode. Also,because a coding unit is split from a depth of 0 to a coded depth, onlysplit information of the coded depth is set to 0, and split informationof depths excluding the coded depth is set to 1.

The image data and encoding information extractor 220 of the videodecoding apparatus 200 may extract and use the information about thecoded depth and the prediction unit of the coding unit 900 to decode thecoding unit 912. The video decoding apparatus 200 may determine a depth,in which split information is 0, as a coded depth by using splitinformation according to depths, and use information about an encodingmode of the corresponding depth for decoding.

FIGS. 10 through 12 are diagrams for describing a relationship betweencoding units 1010, prediction units 1060, and TUs 1070 according to anexemplary embodiment.

The coding units 1010 are coding units having a tree structure,corresponding to coded depths determined by the video encoding apparatus100, in an LCU. The prediction units 1060 are partitions of predictionunits of each of the coding units 1010, and the TUs 1070 are TUs of eachof the coding units 1010.

When a depth of an LCU is 0 in the coding units 1010, depths of codingunits 1012 and 1054 are 1, depths of coding units 1014, 1016, 1018,1028, 1050, and 1052 are 2, depths of coding units 1020, 1022, 1024,1026, 1030, 1032, and 1048 are 3, and depths of coding units 1040, 1042,1044, and 1046 are 4.

In the prediction units 1060, some coding units 1014, 1016, 1022, 1032,1048, 1050, 1052, and 1054 are obtained by splitting the coding units.In other words, partition types in the coding units 1014, 1022, 1050,and 1054 have a size of 2N×N, partition types in the coding units 1016,1048, and 1052 have a size of N×2N, and a partition type of the codingunit 1032 has a size of N×N. Prediction units and partitions of thecoding units 1010 are smaller than or equal to each coding unit.

Transformation or inverse transformation is performed on image data ofthe coding unit 1052 in the TUs 1070 in a data unit that is smaller thanthe coding unit 1052. Also, the coding units 1014, 1016, 1022, 1032,1048, 1050, 1052, and 1054 in the TUs 1070 are different from those inthe prediction units 1060 in terms of sizes and shapes. In other words,the video encoding apparatus 100 and the video decoding apparatus 200may perform intra prediction, motion estimation, motion compensation,transformation, and inverse transformation individually on a data unitin the same coding unit.

Accordingly, encoding is recursively performed on each of coding unitshaving a hierarchical structure in each region of an LCU to determine anoptimum coding unit, and thus coding units having a recursive treestructure may be obtained. Encoding information may include splitinformation about a coding unit, information about a partition type,information about a prediction mode, and information about a size of aTU. Table 1 shows the encoding information that may be set by the videoencoding apparatus 100 and the video decoding apparatus 200.

TABLE 1 Split Information 0 (Encoding on Coding Unit having Size of 2N ×2N and Current Depth of d) Partition Type Size of TU Symmetrical SplitPrediction Partition Asymmetrical Split Information Information 1 ofSplit Mode Type Partition Type 0 of TU TU Information 1 Intra 2N × 2N 2N× nU 2N × 2N N × N Repeatedly Inter 2N × N 2N × nD (Symmetrical EncodeSkip (Only N × 2N nL × 2N Partition Type) Coding Units 2N × 2N) N × N nR× 2N N/2 × N/2 having Lower (Asymmetrical Depth of d + 1 Partition Type)

The outputter 130 of the video encoding apparatus 100 may output theencoding information of the coding units having a tree structure, andthe image data and encoding information extractor 220 of the videodecoding apparatus 200 may extract the encoding information of thecoding units having a tree structure from a received bitstream.

Split information indicates whether a current coding unit is split intocoding units of a lower depth. If split information of a current depth dis 0, a depth, in which a current coding unit is no longer split into alower depth, is a coded depth, and thus information about a partitiontype, a prediction mode, and a size of a TU may be defined for the codeddepth. If the current coding unit is further split according to thesplit information, encoding is independently performed on four splitcoding units of a lower depth.

A prediction mode may be one of an intra mode, an inter mode, and a skipmode. The intra mode and the inter mode may be defined in all partitiontypes, and the skip mode is defined only in a partition type having asize of 2N×2N.

The information about the partition type may indicate symmetricalpartition types having sizes of 2N×2N, 2N×N, N×2N, and N×N, which areobtained by symmetrically splitting a height or a width of a predictionunit, and asymmetrical partition types having sizes of 2N×nU, 2N×nD,nL×2N, and nR×2N, which are obtained by asymmetrically splitting theheight or width of the prediction unit. The asymmetrical partition typeshaving the sizes of 2N×nU and 2N×nD may be respectively obtained bysplitting the height of the prediction unit in 1:3 and 3:1, and theasymmetrical partition types having the sizes of nL×2N and nR×2N may berespectively obtained by splitting the width of the prediction unit in1:3 and 3:1.

The size of the TU may be set to be two types in the intra mode and twotypes in the inter mode. In other words, if split information of the TUis 0, the size of the TU may be 2N×2N, which is the size of the currentcoding unit. If split information of the TU is 1, the TUs may beobtained by splitting the current coding unit. Also, if a partition typeof the current coding unit having the size of 2N×2N is a symmetricalpartition type, a size of a TU may be N×N, and if the partition type ofthe current coding unit is an asymmetrical partition type, the size ofthe TU may be N/2×N/2.

The encoding information of coding units having a tree structure mayinclude at least one of a coding unit corresponding to a coded depth, aprediction unit, and a minimum unit. The coding unit corresponding tothe coded depth may include at least one of a prediction unit and aminimum unit containing the same encoding information.

Accordingly, it is determined whether adjacent data units are includedin the same coding unit corresponding to the coded depth by comparingencoding information of the adjacent data units. Also, a correspondingcoding unit corresponding to a coded depth is determined by usingencoding information of a data unit, and thus a distribution of codeddepths in an LCU may be determined.

Accordingly, if a current coding unit is predicted based on encodinginformation of adjacent data units, encoding information of data unitsin deeper coding units adjacent to the current coding unit may bedirectly referenced and used.

Alternatively, if a current coding unit is predicted based on encodinginformation of adjacent data units, data units adjacent to the currentcoding unit are searched using encoding information of the data units,and the searched adjacent coding units may be referred to for predictingthe current coding unit.

FIG. 13 is a diagram for describing a relationship between a codingunit, a prediction unit, and a TU according to the encoding modeinformation of Table 1.

AN LCU 1300 includes coding units 1302, 1304, 1306, 1312, 1314, 1316,and 1318 of coded depths. Here, because the coding unit 1318 is a codingunit of a coded depth, split information may be set to 0. Informationabout a partition type of the coding unit 1318 having a size of 2N×2Nmay be set to be one of a partition type 1322 having a size of 2N×2N, apartition type 1324 having a size of 2N×N, a partition type 1326 havinga size of N×2N, a partition type 1328 having a size of N×N, a partitiontype 1332 having a size of 2N×nU, a partition type 1334 having a size of2N×nD, a partition type 1336 having a size of nL×2N, and a partitiontype 1338 having a size of nR×2N.

When the partition type is set to be symmetrical, i.e. the partitiontype 1322, 1324, 1326, or 1328, a TU 1342 having a size of 2N×2N is setif split information (TU size flag) of a TU is 0, and a TU 1344 having asize of N×N is set if a TU size flag is 1.

When the partition type is set to be asymmetrical, i.e., the partitiontype 1332, 1334, 1336, or 1338, a TU 1352 having a size of 2N×2N is setif a TU size flag is 0, and a TU 1354 having a size of N/2×N/2 is set ifa TU size flag is 1.

A process of encoding a quantization parameter (QP) in the quantizer 440and the entropy encoder 450 of the image encoder 400 illustrated in FIG.4, and a process of decoding the QP in the entropy decoder 520 and theinverse quantizer 530 of the image decoder 500 illustrated in FIG. 5will now be described in detail.

FIG. 14 is a detailed block diagram of the quantizer 440 illustrated inFIG. 4, according to an exemplary embodiment.

Referring to FIG. 14, the quantizer 440 includes a quantizationperformer 1410, a quantization parameter (QP) predictor 1420, and asubtractor 1430.

The quantization performer 1410 quantizes residual data transformed tothe frequency domain. The quantization performer 1410 may performquantization based on a value obtained by dividing input data by aquantization step Q_Step determined according to a QP. For example, thequantization performer 1410 may perform quantization on input data Coeffbased on the following equation:Q_Coeff=sgn(Coeff)*round[(Coeff)/Q_Step+Offset].Here, Offset denotes an offset, Q_Step denotes a quantization step, andQ_Coeff denotes a quantized result value. Round[X] denotes an operationfor outputting an integer that is not greater than and is the closest toa real number X. Sgn(Coeff) denotes a function having value 1 if thevalue of Coeff is greater than 0, and having value −1 if the value ofCoeff is less than 0. As described above, the quantization performer1410 may perform quantization by dividing the input data by thequantization step Q_Step. The quantization step Q_Step may have a valuedetermined according to the QP. For example, the quantization stepQ_Step may be determined according to the QP as shown in Table 2.

TABLE 2 QP 0 1 2 3 4 5 6 7 8 9 10 . . . Q_Step 0.625 0.6875 0.8125 0.8751 1.125 1.25 1.375 1.625 1.75 2 . . . QP . . . 18 . . . 24 . . . 30 . .. 36 . . . 42 . . . 48 Q_Step 5 10 20 40 80 160

Referring to Table 2, whenever the QP is increased by 6, thequantization step Q_Step is doubled. The quantization using the QP andthe quantization step Q_Step according to the QP are not limited to theabove-described example and may vary.

Opposite to the quantization, inverse quantization is performed by usinga value obtained by multiplying the quantization step Q_Step determinedaccording to the QP, by the input data. For example, inversequantization may be performed by using a value obtained by multiplying aquantization coefficient Q_Coeff by the quantization step Q_Step andthen adding a predetermined offset, as shown in the following equation:InverseQ_Coeff=sgn(Q_coeff)*round[Q_Coeff*Q_Step+Offset].

The QP predictor 1420 obtains a predicted QP QP_Pred that is aprediction value of a QP applied to a current coding unit. As describedabove, in order to perform quantization and inverse quantization on theinput data, QP information is required. In order to reduce the amount ofdata, only a difference between the QP and the predicted QP QP_Pred istransmitted as the QP information. In a decoding process, the QP may berestored by obtaining the predicted QP QP_Pred as in the encodingprocess and adding the difference included in a bitstream. The QPpredictor 1420 may obtain the predicted QP QP_Pred by using a QPdetermined when a previously encoded coding unit is quantized.Specifically, with respect to an initially quantized coding unit ofpredetermined data units, the QP predictor 1420 may obtain the predictedQP QP_Pred by using a slice-level initial QP SliceQP. In more detail,the QP predictor 1420 may predict the predicted QP QP_Pred of a firstquantization group of a parallel-encodable data unit included in a slicesegment, by using the slice-level initial QP SliceQP. A quantizationgroup denotes a set of one or more coding units which share the samepredicted QP QP_Pred. The quantization group may include one coding unitor a plurality of coding units. As will be described below, theparallel-encodable data unit may be a thread including LCUs of the samerow according to wavefront parallel processing (WPP), or a tile obtainedby partitioning a picture with respect to at least one column boundaryand/or a row boundary.

Also, the QP predictor 1420 may obtain the predicted QP QP_Pred by usingQPs determined in adjacent coding units. The process of obtaining thepredicted QP QP_Pred will be described in detail below.

The QP predictor 1420 outputs additional information for obtaining thepredicted QP QP_Pred, to the entropy encoder 450.

The subtractor 1430 outputs a QP difference AQP that is a differencebetween the QP applied to the current coding unit and the predicted QPQP_Pred.

FIG. 15 is a detailed block diagram of the entropy encoder 450illustrated in FIG. 4, according to an exemplary embodiment.

The entropy encoder 450 arithmetically encodes syntax elements generatedaccording to a result of encoding a video. As an arithmetic encodingmethod, context adaptive binary arithmetic coding (CABAC) may be used.Also, the entropy encoder 450 generates a bitstream by transformingvideo data arithmetically encoded on a video coding layer andinformation about various parameters related to video encoding, to aformat according to a network abstraction layer.

In more detail, referring to FIG. 15, the entropy encoder 450 includes asequence parameter set (SPS) generator 1510 for generating an SPSincluding encoding information of a whole sequence, for example, aprofile and a level, a picture parameter set (PPS) generator 1520 forgenerating a PPS including encoding information of each picture includedin the sequence, a slice information generator 1530 for generating sliceinformation including encoding information of slice segments included ina picture, and a TU information generator 1540 for generatinginformation about TUs used in a transformation process. As will bedescribed below, the PPS generator 1520 may include syntaxinit_qp_minus26, which indicates a picture-level initial QP forobtaining a slice-level initial QP SliceQP of each slice included in apicture, in the PPS. Also, the slice information generator 1530 mayinclude syntax slice_qp_delta, which indicates a difference between thesyntax init_qp_minus26 indicating the picture-level initial QP and theslice-level initial QP SliceQP, in a slice header.

In addition to the illustrated hierarchical structure, the entropyencoder 450 may generate a bitstream by encapsulating information abouta data unit of another lower layer, for example, information about acoding unit.

As described above, with respect to an initially quantized coding unit(or a quantization group) of a predetermined parallel-processible dataunit, the QP predictor 1420 may obtain a predicted QP QP_Pred by usingthe slice-level initial QP SliceQP. Here, the predetermined data unitsare data units obtained by partitioning a picture according to picturepartitioning schemes, for example, slices, slice segments, or tiles.

FIG. 16 shows slice segments, slices, and LCUs that are data units usedto partition a picture, according to an exemplary embodiment.

Referring to FIG. 16, the picture may be partitioned into a plurality ofLCUs. FIG. 16 shows an example in which the picture is partitioned into11 LCUs in a horizontal direction and 9 LCUs in a vertical direction,that is, a total of 99 LCUs. As described above in relation to FIGS. 1through 13, each LCU may be encoded and decoded after being partitionedinto coding units having a tree structure.

Also, the picture may be partitioned into one or more slices accordingto slice boundaries. FIG. 16 shows an example that the picture ispartitioned into two slices, such as an upper slice and a lower slice,with respect to a slice boundary. Also, one slice may be partitionedinto one or more slice segments. FIG. 16 shows an example that the upperslice is partitioned into slice segments 1610, 1620, and 1630 withrespect to slice segment boundaries. Also, the lower slice includes oneslice segment 1640.

Each of the slice segments 1610, 1620, 1630, and 1640 may be classifiedinto a dependent slice segment or an independent slice segment accordingto whether the slice segment refers to information included in anotherslice segment. A dependent slice segment is a slice segment in which apartial syntax element included in a slice segment header may bedetermined with reference to a syntax element of a previous slicesegment that is previously processed according to an encoding ordecoding order. An independent slice segment is a slice segment in whicha syntax element of a slice segment header may be determined withoutreference to information of a previous slice segment.

FIG. 17 shows tiles and slice segments that are data units used topartition a picture, according to an exemplary embodiment.

FIG. 17 shows an example in which one picture 1700 is partitioned intothree tiles with respect to column boundaries 1701 and 1703. A picturemay be partitioned into a plurality of tiles with respect to columnboundaries and/or row boundaries. Although a picture is partitioned intotiles with respect to only column boundaries in FIG. 17, the picture mayalso be partitioned into tiles with respect to only row boundaries orboth row boundaries and column boundaries. Also, one tile may include aplurality of slice segments. FIG. 17 shows an example that a tile #1 ispartitioned into three slice segments 1710, 1720, and 1730 with respectto slice boundaries 1702 and 1704.

A tile is a set of LCUs partitioned with respect to column boundariesand/or row boundaries, and is an independent data processing unit onwhich prediction or context prediction is not allowed across a columnboundary or a row boundary. That is, a tile is an independent dataprocessing unit that does not refer to information of another tileinformation, and a plurality of tiles may be processed in parallel.Location information of column boundaries and row boundaries may beincluded in an SPS or a PPS. In a decoding process, location informationof column boundaries and row boundaries may be obtained from an SPS or aPPS, a picture may be partitioned into a plurality of tiles based on theobtained location information of the column boundaries and the rowboundaries, and then the partitioned tiles may be decoded in parallel.

Accordingly, while the tiles of the picture 1700 are processed inparallel, and each tile may be encoded or decoded according to LCUs. InFIG. 17, numbers marked in LCUs denote a scan order of the LCUs in eachtile, that is, an encoding or decoding order.

According to an exemplary embodiment, correlations among slice segments,slices, tiles, and LCUs, that are data units used to partition apicture, may be defined as described below.

With respect to each slice and tile, LCUs encoded (decoded) according toa predetermined scan order should satisfy at least one of conditions (i)and (ii) described below.

(Condition i) All LCUs included in one slice belong to the same tile.

(Condition ii) All LCUs included in one tile belong to the same slice.

Also, with respect to each slice segment and tile, LCUs encoded(decoded) according to a predetermined scan order should satisfy atleast one of conditions (a) and (b) described below.

(Condition a) All LCUs included in one slice segment belong to the sametile.

(Condition b) All LCUs included in one tile belong to the same slicesegment.

Within a range of satisfying at least one of the conditions (i) and (ii)and at least one of the conditions (a) and (b), one picture may bepartitioned by using slices, slice segments, tiles, and LCUs.

FIGS. 18A and 18B show correlations among tiles, slice segments, slices,and LCUs, according to an exemplary embodiment;

Referring to FIG. 18A, a picture 1800 is partitioned into five slicesegments 1811, 1813, 1815, 1817, and 1819 due to slice segment boundarylines 1803, 1805, 1807, and 1809. Also, because one slice is formed ofone independent slice segment 1811 and four dependent slice segments1813, 1815, 1817, and 1819, the picture 1800 includes one slice.

Also, the picture 1800 is partitioned into two tiles due to a tileboundary 1801. As such, a left tile includes three slice segments 1811,1813, and 1815, and a right tile includes two slice segments 1817, and1819.

Initially, it is checked whether the slice segments 1811, 1813, 1815,1817, and 1819, the tiles, and the LCUs satisfy at least one of theconditions (a) and (b) described above in relation to FIG. 17. All LCUsof the slice segments 1811, 1813, and 1815 are included in the lefttile, and thus satisfy the condition (a). Besides, all LCUs of the slicesegments 1817 and 1819 are included in the right tile, and thus alsosatisfy the condition (a).

It is checked whether the slices, the tiles, and LCUs satisfy at leastone of the conditions (i) and (ii) described above in relation to FIG.17. All LCUs of the left tile are included in one slice, and thussatisfy the condition (ii). Besides, all LCUs of the right tile areincluded in one slice, and thus also satisfy the condition (ii).

Referring to FIG. 18B, a picture 1850 is partitioned into two tiles,e.g., a left tile and a right tile, due to a tile boundary line 1851.Also, the picture 1850 is partitioned into three slices due to sliceboundary lines 1866 and 1868, the left tile is partitioned into an upperleft slice and a lower left slice with respect to the slice boundaryline 1866, and the right tile is formed of one right slice.

The upper left slice is partitioned into one independent slice segment1861 and one dependent slice segment 1865 with respect to a slicesegment boundary line 1863. The lower left slice is partitioned into oneindependent slice segment 1881 and one dependent slice segment 1885 withrespect to a slice segment boundary line 1883. The right slice may bepartitioned into one independent slice segment 1891 and one dependentslice segment 1895 with respect to a slice segment boundary line 1893.

Initially, it is checked whether the slice segments 1861, 1865, 1881,1885, 1891, and 1895, the tiles, and the LCUs satisfy at least one ofthe conditions (a) and (b). All LCUs of the slice segments 1861 and 1865are included in the left tile, and thus satisfy the condition (a).Besides, all LCUs of the slice segments 1881 and 1883 are included inthe same left tile, and thus also satisfy the condition (a).Furthermore, all LCUs of the slice segments 1891 and 1893 included inthe same right tile, and thus also satisfy the condition (a).

It is checked whether the slices, the tiles, and LCUs satisfy at leastone of the conditions (i) and (ii). All LCUs of the upper left slice areincluded in the left tile, and thus satisfy the condition (i). Besides,all LCUs of the lower left slice are included in the left tile, and thusalso satisfy the condition (i). Furthermore, all LCUs of the right sliceare included in the right tile and all LCUs of the right tile areincluded in the right slice, and thus satisfy the condition (i).

FIG. 19 is a reference diagram for describing WPP, according to anexemplary embodiment.

WPP denotes a process of processing an LCU after completely processingan upper right LCU for parallel encoding/decoding. In more detail, WPPsets a probability model of a first LCU of each thread by usingprobability information obtained by processing a second LCU of an upperthread. For example, referring to FIG. 19, the entropy encoder 450 setsa probability model of a first LCU 1902 of a thread 2 for entropyencoding by using a probability model obtained after entropy-encoding asecond LCU 1901 of a thread 1. As described above, when LCUs of eachthread are entropy-encoded, the entropy encoder 450 may use aprobability information updated by processing an upper right LCU,thereby allowing parallel entropy encoding.

Also, according to WPP, because a first LCU of each thread is processedafter a second LCU of an upper thread is completely processed, LCUs ofeach thread may be obtained by using motion prediction information, forexample, predicted motion vector information, of LCUs of an upperthread. Accordingly, in FIG. 19, LCUs included in threads 1 through 4may be processed in parallel after upper right LCUs are completelyprocessed.

Data units processed in parallel after being allocated to multi-cores ofa central processing unit (CPU) or a graphics processing unit (GPU) ofan encoding apparatus or a decoding apparatus are defined as threads. Inmore detail, it is assumed that the CPU or the GPU includes fourmulti-cores and four data units may be processed in parallel. In thiscase, as illustrated in FIG. 19, LCUs of the threads 1 through 4 areallocated to the four multi-cores and are processed in parallel. Asdescribed above, according to WPP, an LCU of a thread N (N is aninteger) is processed after being delayed until an upper right LCUincluded in a thread N−1 is completely processed.

According to the above-described WPP, in an entropy encoding process, anLCU of each thread may determine a probability model for entropyencoding after an upper right LCU is completely entropy-encoded.However, from among syntax elements to be entropy-encoded, syntaxcu_qp_delta indicating a difference between a QP and a predicted QPQP_Pred may not be directly entropy-encoded. This is because thepredicted QP QP_Pred should be obtained to determine the differencebetween the QP and the predicted QP QP_Pred and uses a QP determined ina previously processed coding unit according to, for example, a rasterscan order. In more detail, referring to FIG. 19, a predicted QP QP_Predof an LCU 1903 may be predicted as a QP of an LCU 1905 previouslyprocessed according to a raster scan order, or a QP determined in aquantization process of an LCU 1904 previously processed in the samethread. In any case, entropy encoding of the LCU 1903 may be performedonly after the LCU 1905 previously processed according to a raster scanorder or the LCU 1904 previously processed in the same thread iscompletely encoded. As described above, if a predicted QP is obtainedbased on a QP of a previous coding unit, processing may be delayed untilthe previous coding unit is processed and thus a bottleneck problem maybe generated. Accordingly, if a predicted QP is obtained based on a QPof a previous coding unit, overall performance of parallel processingmay be reduced.

Similarly, in an entropy decoding process, an LCU of each thread may beentropy-decoded after an upper right LCU is completely entropy-decoded.Even according to WPP, in an inverse quantization process, a bottleneckproblem may be generated. In order to obtain a QP that is a parameterrequired to perform inverse quantization, a process of obtaining apredicted QP QP_Pred should be performed first. As described above, thepredicted QP QP_Pred of the LCU 1903 may be predicted as a QP determinedin an inverse quantization process of the LCU 1905 previously processedaccording to a raster scan order, or a QP determined in an inversequantization process of the LCU 1904 previously processed in the samethread. Accordingly, a decoding process of the LCU 1903 may be performedonly after the LCU 1905 previously processed according to a raster scanorder or the LCU 1904 previously processed in the same thread iscompletely decoded.

As described above, if a QP determined in a previously processed LCU ora QP determined in a previous LCU of the same thread is used as apredicted QP QP_Pred for performing quantization or inverse quantizationon an LCU, the predicted QP QP_Pred may be obtained only after theprevious LCU is completely processed.

Accordingly, according to an exemplary embodiment, because a slice-levelinitial QP SliceQP is used as a QP predictor QP_Predictor of aninitially quantized data unit from among data units obtained bypartitioning a picture, quantization/inverse quantization may beperformed on the initially quantized data unit regardless of aprocessing order of data units.

FIG. 20 is a diagram for describing a process of obtaining a predictedQP QP_Pred of an LCU included in a slice segment, according to anexemplary embodiment. In FIG. 20, it is assumed that a picture 2000 ispartitioned into two slice segments with respect to a slice segmentboundary.

The quantization performer 1410 determines an optimal QP for quantizingcoding units having a tree structure in consideration of arate-distortion (R-D) cost, quantizes the coding units having a treestructure by using the determined QP, and outputs QP information.

The QP predictor 1420 outputs a predicted QP QP_Pred by predicting a QPof each coding unit. The predicted QP QP_Pred may be predicted by usingvarious methods in consideration of, for example, a processing order ora location of a current coding unit.

For example, with respect to an initially quantized coding unit of aparallel-processible data unit included in a slice segment or aninitially quantized coding unit included in a tile, the QP predictor1420 may obtain the predicted QP QP_Pred by using a slice-level initialQP SliceQP. Referring to FIG. 20, with respect to an initially quantizedcoding unit included in a first LCU 2001 of an upper slice segment, theQP predictor 1420 may obtain the predicted QP QP_Pred by using theslice-level initial QP SliceQP. Similarly, with respect to an initiallyquantized coding unit included in a first LCU 2004 of a lower slicesegment, the QP predictor 1420 may obtain the predicted QP QP_Pred byusing the slice-level initial QP SliceQP.

Also, with respect to and initially quantized coding unit included in afirst LCU of each thread of a slice segment, the QP predictor 1420 mayobtain the predicted QP QP_Pred by using the slice-level initial QPSliceQP. Referring back to FIG. 20, with respect to initially quantizedcoding units included in first LCUs 2002 and 2003 of threads of theupper slice segment, the QP predictor 1420 may obtain the predicted QPQP_Pred by using the slice-level initial QP SliceQP. Similarly, withrespect to initially quantized coding units included in first LCUs 2005,2006, and 2007 of threads of the lower slice segment, the QP predictor1420 may obtain the predicted QP QP_Pred by using the slice-levelinitial QP SliceQP.

Specifically, if a plurality of threads each including LCUs of the samerow are processible in parallel according to WPP, with respect toinitially quantized coding units (a quantization group) included infirst LCUs of threads of a slice segment, the QP predictor 1420 maypredict the predicted QP QP_Pred by using the slice-level initial QPSliceQP. In other words, in a quantization process according to WPP, theQP predictor 1420 may obtain the predicted QP QP_Pred of an initiallyquantized coding unit included in a first LCU of each thread, by usingthe slice-level initial QP SliceQP. If WPP is not used, the QP predictor1420 may obtain the predicted QP QP_Pred of only an initially quantizedcoding unit included in a first LCU of a slice segment, by using theslice-level initial QP SliceQP, and may obtain the predicted QPs QP_Predof coding units other than the initially quantized coding unit, by usingQPs of adjacent coding units.

Also, with respect to an initially quantized quantization group of eachparallel-processible tile, the QP predictor 1420 may predict thepredicted QP QP_Pred by using the slice-level initial QP SliceQP.

FIG. 21 is a diagram for describing a process of obtaining a predictedQP QP_Pred of a coding unit included in an LCU, according to anexemplary embodiment.

Referring to FIG. 21, a first quantization group 2110 to be initiallyquantized and included in a first LCU of a slice segment according to apredetermined scan order includes coding unit a, b, c, and d. Thepredicted QP QP_Pred of the coding unit a is obtained by using aslice-level initial QP SliceQP. The coding units a, b, c, and d includedin the first quantization group 2110 are smaller than a smallest codingunit that may have syntax cu_qp_delta, and thus have the same predictedQP QP_Pred.

As another example, with respect to coding units other than the initialcoding units a, b, c, and d, the QP predictor 1420 may obtain thepredicted QP QP_Pred based on an average of QPs of upper and leftadjacent coding units. For example, predicted QPs of coding units e, f,g, and h of a quantization group 2120 may be determined by using anaverage of a QP QP_a of a left coding unit a and a QP of an upper codingunit. However, the upper coding unit of the coding units e, f, g, and his not available, a QP of a previously processed coding unit may be usedinstead. That is, the QP predictor 1420 may obtain the predicted QPs ofthe coding units e, f, g, and h as shown below.QP_Pred_e=(QP_α+QP_α+1)>>1;QP_Pred_f=(QP_α+QP_e+1)>>1;QP_Pred_g=(QP_α+QP_f+1)>>1; andQP_Pred_h=(QP_α+QP_g+1)>>1;

Predicted QPs of coding units i, j, k, and I of a quantization group2130 may be determined by using an average of a QP QP_β of a left codingunit β and a QP QP_γ of an upper coding unit γ. Because both the QP QP_βof the left coding unit β and the QP QP_γ of an upper coding unit β areavailable, all of the coding units i, j, k, and I may have(QP_β+QP_γ+1)>>1 as their predicted QP.

Upper and left adjacent coding units of the initially processed firstquantization group 2110 are not available, if QPs of the upper and leftadjacent coding units of the coding units a, b, c, and d are assumed asthe slice-level initial QP SliceQP, like the other coding units, thepredicted QP QP_Pred of the coding units a, b, c, and d included in theinitially processed first quantization group 2110 is also regarded asbeing predicted by using an average of QPs of upper and left adjacentcoding units.

As described above, with respect to a first quantization group of aparallel-processible data unit included in a slice segment, the QPpredictor 1420 obtains the predicted QP QP_Pred by using the slice-levelinitial QP SliceQP. A process of obtaining the slice-level initial QPSliceQP will now be described.

The slice-level initial QP SliceQP may be obtained by using apicture-level initial QP init_qp_minus26, and syntax slice_qp_deltaindicating a difference between the picture-level initial QPinit_qp_minus26 and the slice-level initial QP SliceQP as shown in thefollowing equation; SliceQP=26+init_qp_minus26+slice_qp_delta. Thepicture-level initial QP init_qp_minus26 is a value obtained bysubtracting 26 (or another preset constant) from an average of QPs ofinitial coding units of each slice included in a picture. The syntaxslice_qp_delta corresponds to an adjustment value for determining theslice-level initial QP SliceQP of coding units included in a slice, andmay be changed due to cu_qp_delta set at a coding unit level. Thecu_qp_delta corresponds to an adjustment value for changing a QP at acoding unit level. If cu_qp_delta_enable_flag is set as 1, a coding unitlarger than a smallest coding unit determined according to syntaxdiff_cu_qp_delta_depth may have the cu_qp_delta. For example, syntaxinformation (cu_qp_delta) indicating a difference between theslice-level initial QP SliceQP and a QP of an initially quantized codingunit included in a first LCU of each thread may be included in a TU dataset including transformation information of coding units.

FIGS. 22 through 24 show syntax included in headers of data units havinga tree structure in order to predict QPs, according to exemplaryembodiments.

FIG. 22 is a table showing QP-related syntax provided to a PPS,according to an exemplary embodiment.

Referring to FIG. 22, the PPS generator 1520 may include syntaxinit_qp_minus26 2210, which is additional information for obtaining aslice-level initial QP SliceQP of each slice included in a picture, inthe PPS. Also, the PPS generator 1520 may includecu_qp_delta_enabled_flag 2220, which is a flag indicating whether a QPis changeable at a coding unit level, and diff_cu_qp_delta_depth 2230,which is syntax for determining the size of a smallest coding unit thatmay have cu_qp_delta, in the PPS. The syntax diff_cu_qp_delta_depth 2230may indicate a depth of the size of the smallest coding unit that mayhave the cu_qp_delta. For example, when the size of an LCU having adepth 0 is 64×64, if the syntax diff_cu_qp_delta_depth 2230 has a valueof 2, only coding units having depths equal to or less than 2, i.e.,coding units having sizes equal to or greater than 16×16, may have thecu_qp_delta. Also, the PPS generator 1520 may includeentropy_coding_sync_enabled_flag 2240, which indicates whether parallelentropy encoding is performed on a plurality of threads included in aslice segment, in the PPS. If the entropy_coding_sync_enabled_flag 2240is 1, the entropy_coding_sync_enabled_flag 2240 indicates that parallelentropy encoding is performed on a plurality of threads according to WPPas described above. If the entropy_coding_sync_enabled_flag 2240 is 0,the entropy_coding_sync_enabled_flag 2240 indicates that parallelentropy encoding according to WPP is not performed.

As described above, specifically, if WPP is performed, with respect toan initially quantized coding unit included in a first LCU of a threadincluded in a slice segment, the QP predictor 1420 may predict apredicted QP QP_Pred by using the slice-level initial QP SliceQP. Also,with respect to an initially quantized quantization group of eachparallel-processible tile, the QP predictor 1420 may predict thepredicted QP QP_Pred by using the slice-level initial QP SliceQP.

FIG. 23 is a table showing QP-related syntax provided to a slice segmentheader, according to an exemplary embodiment.

Referring to FIG. 23, the slice information generator 1530 may includesyntax slice_qp_delta, which indicates a difference between syntaxinit_qp_minus26 indicating a picture-level initial QP and a slice-levelinitial QP SliceQP, in a slice header.

FIG. 24 is a table showing QP-related syntax added into transformationunit information, according to an exemplary embodiment.

Referring to FIG. 24, the TU information generator 1540 may include sizeinformation 2410 (cu_qp_delta_abs) and sign information 2420(cu_qp_delta_sign) of syntax cu_qp_delta, which indicates a differencebetween a QP at a coding unit level and a predicted QP QP_Pred, in theTU information.

FIG. 25 is a flowchart of a video encoding method according to anexemplary embodiment.

Referring to FIG. 25, in operation 2510, the quantization performer 1410obtains a QP used to perform quantization on coding units included in aslice segment.

In operation 2520, the QP predictor 1420 determines a slice-levelinitial QP SliceQP for predicting a QP of a first quantization group ofa parallel-encodable data unit included in the slice segment. Asdescribed above, the parallel-encodable data unit may be a threadincluding LCUs of the same row according to WPP, or a tile obtained bypartitioning a picture with respect to at least one column boundaryand/or a row boundary.

In operation 2530, the QP predictor 1420 obtains a predicted QP QP_Predof the first quantization group by using the determined slice-levelinitial QP SliceQP. In more detail, if parallel entropy encoding isperformed on a plurality of threads included in a slice segmentaccording to WPP, the QP predictor 1420 may obtain the predicted QPQP_Pred of an initially quantized coding unit of a first LCU of eachthread, by using the slice-level initial QP SliceQP. Also, with respectto an initially quantized quantization group of eachparallel-processible tile, the QP predictor 1420 may predict thepredicted QP QP_Pred by using the slice-level initial QP SliceQP.

Also, even when WPP is not performed, the QP predictor 1420 may obtainthe predicted QP QP_Pred of the initially quantized coding unit of thefirst LCU of the slice segment, by using the slice-level initial QPSliceQP. Besides, the QP predictor 1420 may obtain the predicted QPQP_Pred of an initially quantized coding unit included in the tile, byusing the slice-level initial QP SliceQP. Furthermore, the QP predictor1420 may obtain the predicted QP QP_Pred of a coding unit based on anaverage of QPs of upper and left adjacent coding units of the codingunit.

In operation 2540, the entropy encoder 450 adds syntax information fordetermining the slice-level initial QP SliceQP, into a bitstream. Asdescribed above, the PPS generator 1520 may include syntaxinit_qp_minus26, which indicates a picture-level initial QP forobtaining the slice-level initial QP SliceQP of each slice included inthe picture, in a PPS. Also, the slice information generator 1530 mayinclude syntax slice_qp_delta, which indicates a difference between thesyntax init_qp_minus26 indicating the picture-level initial QP and theslice-level initial QP SliceQP, in a slice header. The TU informationgenerator 1540 may include the size information 2410 (cu_qp_delta_abs)and the sign information 2420 (cu_qp_delta_sign) of syntax cu_qp_delta,which indicates a difference between a QP at a coding unit level and thepredicted QP QP_Pred, in TU information.

FIG. 26 is a detailed block diagram of the entropy decoder 520illustrated in FIG. 5, according to an exemplary embodiment.

The entropy decoder 520 arithmetically decodes syntax elements from abitstream. In more detail, referring to FIG. 26, the entropy decoder 520includes an SPS obtainer 2610 for obtaining an SPS including encodinginformation of a whole sequence, for example, a profile and a level, aPPS obtainer 2620 for obtaining a PPS including encoding information ofeach picture included in the sequence, a slice information obtainer 2630for obtaining slice information including encoding information of slicesegments included in a picture, and a TU information obtainer 2640 forobtaining information about TUs used in a transformation process.

The entropy decoder 520 obtains syntax for determining an initial valueof a QP used to perform inverse quantization on coding units included ina slice segment. In more detail, the PPS obtainer 2620 obtains syntaxinit_qp_minus26 indicating a picture-level initial QP. Also, the sliceinformation obtainer 2630 obtains syntax slice_qp_delta, which indicatesa difference between the syntax init_qp_minus26 indicating thepicture-level initial QP and a slice-level initial QP SliceQP, from aslice header. Besides, the entropy decoder 520 may obtain syntax(entropy_coding_sync_enabled_flag), which indicates whether parallelentropy encoding is performed on a plurality of threads included in aslice segment. If the entropy_coding_sync_enabled_flag is 1, parallelentropy decoding may be performed on a plurality of threads according toWPP as described above. If the entropy_coding_sync_enabled_flag is 0,parallel entropy decoding according to WPP may not be performed.

FIG. 27 is a detailed block diagram of the inverse quantizer 530illustrated in FIG. 5, according to an exemplary embodiment.

Referring to FIG. 27, the inverse quantizer 530 includes a QP predictor2710, an adder 2720, and an inverse quantization performer 2730.

Like the QP predictor 1420 illustrated in FIG. 14, the QP predictor 2710may obtain a predicted QP QP_Pred of coding units. With respect to aninitially inversely quantized coding unit (a quantization group) of apredetermined parallel-processible data unit, the QP predictor 2710 mayobtain the predicted QP QP_Pred by using a slice-level initial QPSliceQP. As described above, the quantization group denotes a set of oneor more coding units which share the same predicted QP QP_Pred. Thequantization group may include one coding unit or a plurality of codingunits. The parallel-decodable data unit may be a thread including LCUsof the same row according to WPP, or a tile obtained by partitioning apicture with respect to at least one column boundary and/or a rowboundary.

Also, the QP predictor 2710 may obtain the slice-level initial QPSliceQP by using a picture-level initial QP init_qp_minus26, and syntaxslice_qp_delta indicating a difference between the picture-level initialQP init_qp_minus26 and the slice-level initial QP SliceQP as shown inthe following equation; SliceQP=26+init_qp_minus26+slice_qp_delta.Besides, the QP predictor 2710 obtains the predicted QP QP_Pred of afirst quantization group of a parallel-processible data unit included ina current slice segment, by using the slice-level initial QP SliceQP.

The adder 2720 restores a QP by adding a QP difference ΔQP, which is adifference between the QP applied to the coding unit and the predictedQP QP_Pred, to the predicted QP QP_Pred.

The inverse quantization performer 2730 performs inverse quantization oninput data by using a quantization step Q_Step determined according tothe restored QP. As described above, opposite to a quantization process,the inverse quantization performer 2730 performs inverse quantization byusing a value obtained by multiplying the input data by the quantizationstep Q_Step determined according to the QP.

FIG. 28 is a flowchart of a video decoding method according to anexemplary embodiment.

Referring to FIG. 28, in operation 2810, the entropy decoder 520 obtainssyntax for determining an initial value of a QP used to perform inversequantization on a first quantization group of a parallel-processibledata unit included in a slice segment, from a bitstream. As describedabove, the PPS obtainer 2620 of the entropy decoder 520 obtains syntaxinit_qp_minus26 indicating a picture-level initial QP, and the sliceinformation obtainer 2630 obtains syntax slice_qp_delta, which indicatesa difference between the syntax init_qp_minus26 indicating thepicture-level initial QP and a slice-level initial QP SliceQP, from aslice header.

In operation 2820, the QP predictor 2710 obtains the slice-level initialQP SliceQP for predicting a QP used to perform inverse quantization oncoding units included in a slice segment, based on the obtained syntax.As described above, the QP predictor 2710 may obtain the slice-levelinitial QP SliceQP by using the picture-level initial QPinit_qp_minus26, and the syntax slice_qp_delta indicating a differencebetween the picture-level initial QP init_qp_minus26 and the slice-levelinitial QP SliceQP as shown in the following equation;SliceQP=26+init_qp_minus26+slice_qp_delta.

In operation 2830, the QP predictor 2710 obtains a predicted QP QP_Predof the first quantization group of the parallel-processible data unitincluded in the slice segment, by using the slice-level initial QPSliceQP.

In operation 2840, the adder 2720 determines a QP by adding a QPdifference ΔQP, which is a difference between the QP applied to thecoding unit and the predicted QP QP_Pred, to the predicted QP QP_Pred.

In operation 2850, the inverse quantization performer 2730 obtains aquantization step Q_Step based on the determined QP, and performsinverse quantization on a coding unit included in the first quantizationgroup, by using the quantization step Q_Step.

The exemplary embodiments can be written as computer programs and can beimplemented in general-use digital computers that execute the programsusing a computer-readable recording medium. Examples of thecomputer-readable recording medium include magnetic storage media (e.g.,ROM, floppy disks, hard disks, etc.) and optical recording media (e.g.,CD-ROMs or DVDs).

While the exemplary embodiments have been particularly shown anddescribed, it will be understood by one of ordinary skill in the artthat various changes in form and details may be made therein withoutdeparting from the spirit and scope of the present application asdefined by the following claims. The exemplary embodiments should beconsidered in a descriptive sense only and not for purposes oflimitation. Therefore, the scope of the present application is definednot by the detailed description of the invention but by the followingclaims, and all differences within the scope will be construed as beingincluded within the present application.

The invention claimed is:
 1. A video decoding method comprising:obtaining a quantization parameter of a slice; generating a predictedquantization parameter of a current quantization group using thequantization parameter of the slice; generating a predicted quantizationparameter of a next quantization group using the quantization parameterof the slice; obtaining, according to a size of a coding unit includedin a first largest coding unit in a current row including the currentquantization group, a syntax to determine a quantization parameter ofthe current quantization group; determining a quantization parameter ofthe current quantization group using the syntax and the predictedquantization parameter of the current quantization group; and performingan inverse quantization on the current quantization group and the nextquantization group, wherein the current quantization group is a firstquantization group in the current row included in the slice, the nextquantization group is a first quantization group in a next row includedin the slice, each of the current row and the next row comprises aplurality of largest coding units, wherein a predicted quantizationparameter of a quantization group in the current row which is not thecurrent quantization group, is generated using a quantization parameterof a neighboring coding unit of the quantization group in the currentrow, and wherein a predicted quantization parameter of a quantizationgroup in the next row which is not the next quantization group, isgenerated using a quantization parameter of a neighboring coding unit ofthe quantization group in the next row.
 2. The video decoding method ofclaim 1, wherein the current quantization group is a set of at least oneof coding units sharing the predicted quantization parameter of thecurrent quantization group.